﻿using System;
using UnityEngine;

/// <summary>
/// 定义枚举和常量
/// </summary>
public class Def
{
    public const int INVALID = -1;

    ///////NPC类型
    public enum NpcType
    {
        Null,
        SkillsTeach,//技能师
        EquipTeach,//武器装备
        SkipNine,//皮九
        ProtalTeach,//传送师
    }

    [System.Serializable]
    public class ManTalkData
    {
        public string key;  //对话的内容key
        public int Index; //
    }

    public enum AliveType
    {
        Role,
        Monster,
    }

    public class PlayerPrefsKey
    {
        public const string AtkInputType = "AtkInputType";    //自动攻击还是手动攻击

        public const string MusicOnOff = "MusicOnOff";   //音乐开关

        public const string EffectOnOff = "EffectOnOff";  //音效开关
    }

    /// <summary>
    /// 全局 事件名
    /// </summary>
    public class GlobalMessagerEventName
    {
        /// <summary>
        /// 开门
        /// </summary>
        public const string OpenDoor = "OpenDoor";
        /// <summary>
        /// 关门
        /// </summary>
        public const string CloseDoor = "CloseDoor";
        /// <summary>
        /// 锁定
        /// </summary>
        public const string LockAll = "LockAll";

        //游戏中过场动画播放完成
        public const string CutScenePlayEnd = "CutScenePlayEnd";

        //人物对话部分播放完成以后
        public const string OnTalkFinishWith = "OnTalkFinishWith";
        /// <summary>
        /// 游戏结束  true 为获胜，false 为失败
        /// </summary>
        public const string OnBattleOver = "OnBattleOver";

        //摄像机震动的事件
        public const string OnReceiveCameraShake = "OnReceiveCameraShake";

        public const string OnInputTypeChange = "OnInputTypeChange";

    }
    /// <summary>
    /// 游戏中的特效
    /// </summary>
    public class GameBattleEff
    {
        public const string BooledFormAlive = "BooledFromAlive";
        public const string BooledInGround = "BooledInGround";
        public const string Boss0Shapeshifting = "Boss0Shapeshifting";
        /// <summary>
        /// 陷阱 地雷
        /// </summary>
        public const string Mine = "Mine";
        /// <summary>
        /// 弩
        /// </summary>
        public const string Crossbow = "Crossbow";
        public const string SpawnAlert = "SpawnAlert";
        public const string BigBoom = "BigBoom";

        public const string SkillAlert = "SkillAlertShow";
    }
    public class GameBattleUI
    {
        public const string NormalBooledBar = "BloodMonster";
        public const string MineCount = "MineCount";
    }
    public enum HudTipsType
    {
        /// <summary>
        /// 伤血
        /// </summary>
        BloodTrouble = 1,
        /// <summary>
        /// 暴击
        /// </summary>
        Critical,
        /// <summary>
        /// 闪避
        /// </summary>
        Dodge,
        /// <summary>
        /// 回血
        /// </summary>
        BloodReturn
    }
    public class GameObjectLayer
    {
        public const int PlayerLayer = 8;
        public const int MonsterLayer = 9;
        public const int FlyMonsterLayer = 9;
        public const int Ground = 13;
        public const int Wall = 11;
        public const int PlayerBullt = 14;
        public const int MonsterSpawn = 15;
    }

    /// <summary>
    /// 怪物模型的位置  实例位置 为 MonsterModelPath+模型号+"/inst"
    /// </summary>
    public const string MonsterModelPath = "Model/monster/";
    /// <summary>
    /// 怪物投掷技能的 实例位置 为 MonsterBulletPath+资源号
    /// </summary>
    public const string MonsterBulletPath = "effect/monsterBullet/";

    public const string GameUIpath = "ui/GameUISystem";

    public const string EffetcPath = "NewEffect/";
    /// <summary>
    /// 连击间隔时间
    /// </summary>
    public const float CombosInterval = 2f;
    //不同平台下StreamingAssets的路径是不同的，这里需要注意一下。
    public static readonly string ResourcePathURL =
#if  UNITY_EDITOR
 Application.persistentDataPath + "/";
#elif UNITY_STANDALONE_WIN
        "file://" + Application.dataPath + "/StreamingAssets/";
#elif UNITY_ANDROID
        "jar:file://" + Application.dataPath + "!/assets/";
#elif UNITY_IPHONE
        "file://"+Application.dataPath + "/Raw/";
#else
        string.Empty;
#endif

    /// <summary>
    /// 怪物类型 Normol 为普通，Solo为精英，Boss为Boss
    /// </summary>
    public enum ModleType
    {
        /// <summary>
        /// 普通
        /// </summary>
        Normol = 1,
        /// <summary>
        /// 精英
        /// </summary>
        Solo,
        /// <summary>
        /// Boss
        /// </summary>
        Boss
    }



    /// <summary>
    /// 技能类型
    /// </summary>
    public enum SkillForm
    {
        /// <summary>
        /// 投掷技能
        /// </summary>
        Cast = 1,
        /// <summary>
        /// 进阶
        /// </summary>
        Advanced,
        /// <summary>
        /// 冲刺技能
        /// </summary>
        Rush,
        /// <summary>
        /// 召唤技能
        /// </summary>
        Summoned,
        /// <summary>
        /// 全屏技能
        /// </summary>
        Interstitial,
    }

    /// <summary>
    /// 技能伤害类型
    /// </summary>
    public enum SkillEffect
    {
        /// <summary>
        /// 掉血
        /// </summary>
        Blood = 1,
        /// <summary>
        /// 进阶
        /// </summary>
        Advanced,
        /// <summary>
        /// 召唤
        /// </summary>
        Summoned,
        /// <summary>
        /// 减速
        /// </summary>
        Spdown,

    }

    /// <summary>
    /// 怪物技能触发条件
    /// </summary>
    public enum MonsterTriggerType
    {
        /// <summary>
        /// 距离
        /// </summary>
        Distance = 1,
        /// <summary>
        /// 时间
        /// </summary>
        Time,
        /// <summary>
        /// 血量
        /// </summary>
        Boold,
    }

    /// <summary>
    /// 怪物 移动类型
    /// </summary>
    public enum MonsterFlyType
    {
        Land = 0,
        Fly,
    }

    /// <summary>
    /// 伤害类型 人怪通用
    /// </summary>
    public enum AtkType
    {
        /// <summary>
        /// 没有
        /// </summary>
        None = 0,
        /// <summary>
        /// 普通攻击
        /// </summary>
        Normal = 1,
        /// <summary>
        /// 减速
        /// </summary>
        SpDown,
        /// <summary>
        /// 眩晕
        /// </summary>
        Dizziness,
        /// <summary>
        /// 流血
        /// </summary>
        Booled,
        /// <summary>
        /// 诅咒
        /// </summary>
        Curse,
        /// <summary>
        /// 中毒
        /// </summary>
        Poison,
        /// <summary>
        /// 灼烧
        /// </summary>
        Firing,
        /// <summary>
        /// 混乱
        /// </summary>
        Chaos,
        /// <summary>
        /// 暴击
        /// </summary>
        Crit
    }

    /// <summary>
    /// 任务类型
    /// </summary>
    public class TaskType
    {
        /// <summary>
        /// 无
        /// </summary>
        public const int None = 0;
        /// <summary>
        /// 主线
        /// </summary>
        public const int Main = 1;
        /// <summary>
        /// 日常
        /// </summary>
        public const int Everyday = 2;
        /// <summary>
        /// 活动
        /// </summary>
        public const int Activity = 3;
    }

    /// <summary>
    /// 技能槽
    /// </summary>
    public class SkillSlot
    {
        public const int Skill1 = 1;
        public const int Skill2 = 2;
        public const int Skill3 = 3;
        public const int Dodge = 4;
    }

    ///// <summary>
    ///// 装备类型
    ///// </summary>
    //public class EquipType
    //{
    //    /// <summary>
    //    /// 武器
    //    /// </summary>
    //    public const int Weapon = 0;
    //    /// <summary>
    //    /// 防具
    //    /// </summary>
    //    public const int Armor = 1;
    //    /// <summary>
    //    /// 符印
    //    /// </summary>
    //    public const int Rune = 2;
    //}

    /// <summary>
    /// 品质类型
    /// </summary>
    public class QualityType
    {
        /// <summary>
        /// 白色
        /// </summary>
        public const int White = 0;
        /// <summary>
        /// 绿色
        /// </summary>
        public const int Green = 1;
        /// <summary>
        /// 蓝色
        /// </summary>
        public const int Blue = 2;
        /// <summary>
        /// 蓝色+1
        /// </summary>
        public const int Blue1 = 3;
        /// <summary>
        /// 蓝色+2
        /// </summary>
        public const int Blue2 = 4;
        /// <summary>
        /// 蓝色+3
        /// </summary>
        public const int Blue3 = 5;
        /// <summary>
        /// 紫色
        /// </summary>
        public const int Purple = 6;
        /// <summary>
        /// 紫色+1
        /// </summary>
        public const int Purple1 = 7;
        /// <summary>
        /// 紫色+2
        /// </summary>
        public const int Purple2 = 8;
        /// <summary>
        /// 紫色+3
        /// </summary>
        public const int Purple3 = 9;
    }

    /// <summary>
    /// 宠物类型
    /// </summary>
    public class PetType
    {
        /// <summary>
        /// 精灵
        /// </summary>
        public const int Sprite = 0;
        /// <summary>
        /// 魔剑
        /// </summary>
        public const int MagicSword = 1;
        /// <summary>
        /// 野熊
        /// </summary>
        public const int WildBear = 2;
        /// <summary>
        /// 狂狼
        /// </summary>
        public const int DireWolf = 3;
        /// <summary>
        /// 血蝙蝠
        /// </summary>
        public const int BloodBat = 4;
    }

    public class CurrencyType
    {
        /// <summary>
        /// 金币
        /// </summary>
        public const int Gold = 1;
        /// <summary>
        /// 钻石
        /// </summary>
        public const int Coin = 2;
    }

    public class RewardType
    {
        /// <summary>
        /// 金钱
        /// </summary>
        public const int Gold = 1;
        /// <summary>
        /// 杀敌数
        /// </summary>
        public const int Kill = 2;
        /// <summary>
        /// 钻石
        /// </summary>
        public const int Coin = 3;
        /// <summary>
        /// 宠物
        /// </summary>
        public const int Pet = 4;
    }

    /// <summary>
    /// 关卡模式
    /// </summary>
    public enum PassType
    {
        /// <summary>
        /// 闯关
        /// </summary>
        CheckPoint,
        /// <summary>
        /// 无尽
        /// </summary>
        Endless,
    }

    /// <summary>
    /// 关卡难度
    /// </summary>
    public enum DifficultType
    {
        /// <summary>
        /// 一星
        /// </summary>
        One,
        /// <summary>
        /// 二星
        /// </summary>
        Two,
        /// <summary>
        /// 三星
        /// </summary>
        Three,
    }

    public enum FightingType
    {
        /// <summary>
        /// 普通杀敌
        /// </summary>
        Kill,
        /// <summary>
        /// 保护水晶
        /// </summary>
        Protect,
        /// <summary>
        /// 阻止越界
        /// </summary>
        Hold,

    }

    public enum DotDisplayTypeEn
    {
        Booled,
        Count,
        Time
    }

    public enum MonsterSpawnEnum
    {
        /// <summary>
        /// 带触发的 综合刷怪模式
        /// </summary>
        OnTriggerAndOther,
        /// <summary>
        /// 顺序
        /// </summary>
        Once,
        /// <summary>
        /// 随机
        /// </summary>
        Random,
        /// <summary>
        /// 触发
        /// </summary>
        OnTrigger,
        /// <summary>
        /// 时间
        /// </summary>
        Times


    }
    /// <summary>
    /// 物品类型
    /// </summary>
    public enum GameObjectTypeEnum
    {

        /// <summary>
        /// 击碎出道具
        /// </summary>
        BreakOutTheProps,
        /// <summary>
        /// 击碎出钱
        /// </summary>
        BreakOutTheMomey,
        /// <summary>
        /// 人物触碰少血
        /// </summary>
        RoleSupBooled,
        /// <summary>
        /// 主动远程攻击的物件
        /// </summary>
        AtkRole,
        /// <summary>
        /// 触碰触发剧情对话的NPC
        /// </summary>
        NPC,
        /// <summary>
        /// 触碰触发刷怪
        /// </summary>
        MonsterSpawnNow,
        /// <summary>
        /// Boss出场位移位置
        /// </summary>
        BossTargetPositon,

    }

    public enum GameObjectBoolCreateType
    {
        /// <summary>
        /// unity类型的gameobject 克隆
        /// </summary>
        Instance,
        /// <summary>
        /// C#类型的object 实例
        /// </summary>
        New,
    }

    /// <summary>
    /// 装备类型
    /// </summary>
    public enum EquipType
    {
        /// <summary>
        /// 武器
        /// </summary>
        Weapon,
        /// <summary>
        /// 衣服
        /// </summary>
        Clothes,
        /// <summary>
        /// 帽子
        /// </summary>
        Hat,
        /// <summary>
        /// 腰带
        /// </summary>
        Belt
    }

    /// <summary>
    /// 场景
    /// </summary>
    public class LoadLevel
    {

        /// <summary>
        /// 登陆
        /// </summary>
        public const int LoginScene = 0;

        /// <summary>
        /// 载入
        /// </summary>
        public const int LoadingScene = 1;

        /// <summary>
        /// 创建角色
        /// </summary>
        public const int RoleCreate = 2;

        /// <summary>
        /// 养成
        /// </summary>
        public const int ShopScene = 3;

        /// <summary>
        /// 战斗
        /// </summary>
        public const int BattleScene = 4;
    }

    public class SoummonShowType
    {
        /// <summary>
        /// 闪烁分身
        /// </summary>
        public const int Flicker = 1;
        /// <summary>
        ///
        /// </summary>
        public const int Delay = 2;
    }
    public enum RoleType
    {
        /// <summary>
        /// 艾瑞莉娅
        /// </summary>
        Irelia,
        /// <summary>
        /// 西瓦纳斯
        /// </summary>
        Sylvanas,
    }

    //关卡通关模式
    public enum StagePlayMode
    {
        Infinite = 0,   //无尽模式
        StageTower = 1, //通天塔模式
    }

    public enum WeaponType
    {
        No_Weapon = 0,
        Sylvanas_Bow,
        Crossbow,
    }

    //武器打出的子弹类型
    public enum BulletType
    {
        No_Bullet = 0,   //空类型
        knife = 1,   //刀，代表近身攻击的子弹类型

        NormalArrow = 100,  //普通箭，所有角色和怪都可以用
    }

    public class BulletHit
    {
        /// <summary>
        /// 刀，代表近身攻击的子弹类型 击中特效
        /// </summary>
        public const string knife = "KnifHit";
        /// <summary>
        /// 普通弓箭击中特效
        /// </summary>
        public const string NormalArrow = "ArrowHit";
    }

    public class UITipsName
    {
        public const string HudCritiTips = "HudCritiTips";
        public const string HudTips = "HudTips";
    }


    public enum AtkLayer   //用来定义攻击的层，比如一个子弹可以攻击怪物而不能攻击敌人则应选择NPC层，也可以位旗标示
    {
        No_Damage = 0,
        All_Damage = 1,
        NPC = 2,
        Player = 4,
    }

    public enum MonsterType
    {
        No_Monster = 0,   //没有怪物，如果通过怪物的type生成，NOMonster表示不生成
        BigSword = 1,  //大剑男
        BigBat,//大蝙蝠
        Death,//死神
        Wolf,//霜狼
        Frog,//青蛙
        Golem,//石像兵
    }

    //定义了不同的摄像机抖动程度
    public enum CameraShakeType
    {
        No_Shake = 0,
        Shake_Easy_1 = 1,  //轻微抖动，抖动一次
        Shake_Easy_2,
        Shake_Easy_3,
        Shake_Middle_1,
        Shake_Middle_2,
        Shake_Middle_3,
        Shake_Hard_1,
        Shake_Hard_2,
        Shake_Hard_3,
        Shake_Mini_1,   //级细微抖动
        Shake_Mini_2,
        Shake_Mini_3,
    }

    //攻击释放的方式，是自动还是手动
    public enum AttackInputType
    {
        HandeAtk = 0,  //默认手动攻击
        AutoAtk,    //手动攻击
    }
}